<?php
require(dirname(__FILE__)."/"."global.php");

if(!$step)
	$step = 0;	

$backBtn = "<a href='javascript:history.go(-1);'><img src='".$webdb[www_url]."/images/health/images/shangyibu.jpg' width='111' height='37' /></a>";
$closeBtn = "<a href='javascript:window.close();'><input type='button' value='关闭' style='padding:5px 10px;'></a>";
if($step==0) {
	require(ROOT_PATH."inc/head.php");
	require(html("start"));
} elseif ($step==1){
	if(!$lfjuid)
		showerr("请您先登录我们的网站!");
	
	require(ROOT_PATH."inc/head.php");
	
	$userinfo = $db->get_one("SELECT * FROM h_memberdata WHERE uid=$lfjuid");
	if(!$userinfo)
		showerr("无法找到您的帐户，请重新登录");
	
	if($userinfo['tijian_kahao'] == "") {
		$userinfo['tijian_kahao'] = date("YmdHis").floor(microtime()*1000);
	}
	// 已选行业
//	$t = $userinfo['trade'];
//	$trade[$t] = " selected ";
	// 已选规模
	$s = $userinfo['scale'];
	$scale[$s] = " selected ";
	// 已选性质
	$p = $userinfo['com_property'];
	$property[$p] = " selected ";
	// 已选经营业态
	$jy = $userinfo['jingying_yetai'];
	$yetai[$jy] = " checked ";
	// 已选经营模式
	$ms = $userinfo['jingying_moshi'];
	$moshi[$ms] = " checked ";
	// 已选使用软件
	$is = $userinfo['is_software'];
	$is_software[$is] = " checked ";
	// 已选拥有服务器
	$if = $userinfo['is_fuwuqi'];
	$is_fuwuqi[$if] = " checked ";
	
	require(html("one"));
} elseif ($step==2) {// 数据采集
	
	if(!$lfjuid)
		showerr("请您先登录我们的网站!");
	
	if($tijian_kahao == "") {
		showerr("体检卡号不能为空");
	}
	if($company_name == "") {
		showerr("企业名称不能为空");
	}
	if($scale == "0") {
		showerr("请选择规模");
	}
	if($com_property == "0") {
		showerr("请选择企业性质");
	}
	if($create_time == "") {
		showerr("成立时间不能为空");
	}
	if(!$jingying_yetai) {
		showerr("请选择经营业态");
	}
	if(!$jingying_moshi) {
		showerr("请选择经营模式");
	}	
	if($com_faren == "") {
		showerr("企业法人不能为空");
	}
	if($a_area == "" || $b_area == "") {
		showerr("区域不能为空");
	}
	if($address == "") {
		showerr("地址不能为空");
	}
	if($mobphone == "") {
		showerr("联系电话不能为空");
	}
	if($contacter == "") {
		showerr("联系人不能为空");
	}
	if($email == "") {
		showerr("邮箱不能为空");
	}
	
	require(ROOT_PATH."inc/head.php");
	
	$db->query("UPDATE h_memberdata SET 
					tijian_kahao='$tijian_kahao',
					basic_info='$basic_info',
					trade='$trade',
					scale='$scale',
					com_property='$com_property',
					create_time='$create_time',
					jingying_yetai='$jingying_yetai',
					jingying_moshi='$jingying_moshi',
					is_software='$is_software',
					pc_count='$pc_count',
					is_fuwuqi='$is_fuwuqi',
					it_count='$it_count',
					com_faren='$com_faren',
					faren_phone='$faren_phone',
					faren_email='$faren_email',
					site_add='$site_add',
					a_area='$a_area',
					b_area='$b_area',
					address='$address',
					mobphone='$mobphone',
					contacter='$contacter',
					email='$email',
					note='$note'		
					 	where uid=$lfjuid");
	
	// 查询指标采集
	$cjrs = $db->get_one("SELECT * FROM h_form_content_11 WHERE uid=$lfjuid ");
	
	$lastyear = date("Y")-1;
	$blastyear = date("Y")-2;
	$area = $a_area.$b_area;
	require(html("two"));
} elseif ($step==11) {// 预览
	
	if(!$lfjuid)
		showerr("请您先登录我们的网站!");
	
	if($tijian_kahao == "") {
		showerr("体检卡号不能为空");
	}
	if($company_name == "") {
		showerr("企业名称不能为空");
	}
	
	if($t1_1_4 == "" || $t1_1_5 == "" || $t3_6_1 == "" || $t3_6_2 == "") {
		showerr("请输入两年度直营店营业收入<br/>".$closeBtn);
	}
	if($t1_4_4 == "" || $t1_4_5 == "") {
		showerr("请输入两年度合计营业收入<br/>".$closeBtn);
	}
	if($t3_7_1 == "" || $t3_7_2 == "" || $t3_8_1 == "" || $t3_8_2 == "") {
		showerr("请输入营业成本及原料成本<br/>".$closeBtn);
	}
	if($t3_10_1 == "" || $t3_10_2 == "" || $t3_11_1 == "" || $t3_11_2 == "") {
		showerr("请输入营业费用及人工费用<br/>".$closeBtn);
	}
	if($t3_21_1 == "" || $t3_21_2 == "") {
		showerr("请输入利润总额<br/>".$closeBtn);
	}
	
	// 规模
	if($scale == 0) {
		$scale = "";
	} elseif($scale == 1) {
		$scale = "500万-1000万";
	} elseif($scale == 2) {
		$scale = "1000万-2000万";
	} elseif($scale == 3) {
		$scale = "3000万-1亿";
	} elseif($scale == 4) {
		$scale = "1亿-3亿";
	} elseif($scale == 5) {
		$scale = "3亿以上";
	} elseif($scale == 5) {
		$scale = "500万以下";
	}
	
	// 企业性质
	if($com_property == 0) {
		$com_property = "";
	} elseif($com_property == 1) {
		$com_property = "民营";
	} elseif($com_property == 2) {
		$com_property = "国营";
	} elseif($com_property == 3) {
		$com_property = "股份制";
	} elseif($com_property == 4) {
		$com_property = "外资";
	} elseif($com_property == 5) {
		$com_property = "合资";
	}
	// 经营业态
	if($jingying_yetai == 0) {
		$jingying_yetai = "";
	} elseif($jingying_yetai == 1) {
		$jingying_yetai = "中餐";
	} elseif($jingying_yetai == 2) {
		$jingying_yetai = "快餐";
	} elseif($jingying_yetai == 3) {
		$jingying_yetai = "西餐";
	} elseif($jingying_yetai == 4) {
		$jingying_yetai = "火锅";
	} elseif($jingying_yetai == 5) {
		$jingying_yetai = "酒店餐饮";
	} elseif($jingying_yetai == 6) {
		$jingying_yetai = "休闲餐饮";
	} elseif($jingying_yetai == 7) {
		$jingying_yetai = "团膳";
	} elseif($jingying_yetai == 8) {
		$jingying_yetai = "其他";
	}
	// 经营模式
	if($jingying_moshi == 0) {
		$jingying_moshi = "";
	} elseif($jingying_moshi == 1) {
		$jingying_moshi = "单店经营";
	} elseif($jingying_moshi == 2) {
		$jingying_moshi = "在某一省（市）的多门店连锁经营";
	} elseif($jingying_moshi == 3) {
		$jingying_moshi = "跨区域的多门店连锁经营";
	} elseif($jingying_moshi == 4) {
		$jingying_moshi = "多业态、跨区域的集团经营";
	}
	
//	$cjrs = $db->get_one("SELECT * FROM h_form_content_10 WHERE uid=$lfjuid ");
//	$user = $db->get_one("SELECT * FROM h_memberdata WHERE uid=$lfjuid");
//	$year = date("Y");
	$lastyear = date("Y")-1;
	$blastyear = date("Y")-2;
	$thedate = date("Y-m-d");
	
	require(html("confirm"));
} elseif ($step==10) {// 参与百强申报
	
	$baiqiang_form = $db->get_one("select usetitle from h_form_module where id=11");
	if($baiqiang_form['usetitle']==0) {
		showerr("百强申报已关闭!");
	}
	
	if(!$lfjuid)
	showerr("请您先登录我们的网站!");
	
	if($tijian_kahao == "") {
		showerr("体检卡号不能为空");
	}
	if($company_name == "") {
		showerr("企业名称不能为空");
	}
	
	$userinfo = $db->get_one("SELECT * FROM h_memberdata WHERE uid=$lfjuid");
	if(!$userinfo)
		showerr("无法找到您的帐户，请重新登录");
	
	if(!$t1_1_1) $t1_1_1=0;if(!$t1_1_2) $t1_1_2=0;if(!$t1_1_3) $t1_1_3=0;if(!$t1_1_4) $t1_1_4=0;if(!$t1_1_5) $t1_1_5=0;
	if(!$t1_2_1) $t1_2_1=0;if(!$t1_2_2) $t1_2_2=0;if(!$t1_2_3) $t1_2_3=0;if(!$t1_2_4) $t1_2_4=0;if(!$t1_2_5) $t1_2_5=0;
	if(!$t1_3_1) $t1_3_1=0;if(!$t1_3_2) $t1_3_2=0;if(!$t1_3_3) $t1_3_3=0;if(!$t1_3_4) $t1_3_4=0;if(!$t1_3_5) $t1_3_5=0;
	if(!$t1_4_1) $t1_4_1=0;if(!$t1_4_2) $t1_4_2=0;if(!$t1_4_3) $t1_4_3=0;if(!$t1_4_4) $t1_4_4=0;if(!$t1_4_5) $t1_4_5=0;
	
	if(!$t2_1) $t2_1=0;if(!$t2_2) $t2_2=0;if(!$t2_3) $t2_3=0;if(!$t2_4) $t2_4=0;if(!$t2_5) $t2_5=0;if(!$t2_6) $t2_6=0;
	
	if(!$t3_1_1) $t3_1_1=0;if(!$t3_1_2) $t3_1_2=0;
	if(!$t3_2_1) $t3_2_1=0;if(!$t3_2_2) $t3_2_2=0;
	if(!$t3_3_1) $t3_3_1=0;if(!$t3_3_2) $t3_3_2=0;
	if(!$t3_4_1) $t3_4_1=0;if(!$t3_4_2) $t3_4_2=0;
	if(!$t3_5_1) $t3_5_1=0;if(!$t3_5_2) $t3_5_2=0;
	if(!$t3_6_1) $t3_6_1=0;if(!$t3_6_2) $t3_6_2=0;
	if(!$t3_7_1) $t3_7_1=0;if(!$t3_7_2) $t3_7_2=0;
	if(!$t3_8_1) $t3_8_1=0;if(!$t3_8_2) $t3_8_2=0;
	if(!$t3_9_1) $t3_9_1=0;if(!$t3_9_2) $t3_9_2=0;
	if(!$t3_10_1) $t3_10_1=0;if(!$t3_10_2) $t3_10_2=0;
	if(!$t3_11_1) $t3_11_1=0;if(!$t3_11_2) $t3_11_2=0;
	if(!$t3_12_1) $t3_12_1=0;if(!$t3_12_2) $t3_12_2=0;
	if(!$t3_13_1) $t3_13_1=0;if(!$t3_13_2) $t3_13_2=0;
	if(!$t3_14_1) $t3_14_1=0;if(!$t3_14_2) $t3_14_2=0;
	if(!$t3_15_1) $t3_15_1=0;if(!$t3_15_2) $t3_15_2=0;
	if(!$t3_16_1) $t3_16_1=0;if(!$t3_16_2) $t3_16_2=0;
	if(!$t3_17_1) $t3_17_1=0;if(!$t3_17_2) $t3_17_2=0;
	if(!$t3_18_1) $t3_18_1=0;if(!$t3_18_2) $t3_18_2=0;
	if(!$t3_19_1) $t3_19_1=0;if(!$t3_19_2) $t3_19_2=0;
	if(!$t3_20_1) $t3_20_1=0;if(!$t3_20_2) $t3_20_2=0;
	if(!$t3_21_1) $t3_21_1=0;if(!$t3_21_2) $t3_21_2=0;
	if(!$t3_22_1) $t3_22_1=0;if(!$t3_22_2) $t3_22_2=0;
	
	if(!$t3_24_1) $t3_24_1=0;if(!$t3_24_2) $t3_24_2=0;if(!$t3_24_3) $t3_24_3=0;if(!$t3_24_4) $t3_24_4=0;if(!$t3_24_5) $t3_24_5=0;
	if(!$t3_25_1) $t3_25_1=0;if(!$t3_25_2) $t3_25_2=0;if(!$t3_25_3) $t3_25_3=0;if(!$t3_25_4) $t3_25_4=0;if(!$t3_25_5) $t3_25_5=0;
	if(!$t3_26_1) $t3_26_1=0;if(!$t3_26_2) $t3_26_2=0;if(!$t3_26_3) $t3_26_3=0;if(!$t3_26_4) $t3_26_4=0;if(!$t3_26_5) $t3_26_5=0;
	if(!$t3_27_1) $t3_27_1=0;
	
	if(!$t3_28_1) $t3_28_1=0;if(!$t3_28_2) $t3_28_2=0;
	if(!$t3_29_1) $t3_29_1=0;if(!$t3_29_2) $t3_29_2=0;
	if(!$t3_30_1) $t3_30_1=0;if(!$t3_30_2) $t3_30_2=0;
	if(!$t3_add_1_1) $t3_add_1_1=0;if(!$t3_add_1_2) $t3_add_1_2=0;
	if(!$t3_add_2_1) $t3_add_2_1=0;if(!$t3_add_2_2) $t3_add_2_2=0;
	
	$lastyear = date("Y")-1;
	$blastyear = date("Y")-2;
	$thedate = date("Y-m-d");
//	$rs1 = $db->get_one("select * from h_form_content_10 where uid=$lfjuid ");
	
	$query = $db->query("SELECT * FROM h_form_content WHERE uid=$lfjuid and mid=11 ");
	if(!mysql_num_rows($query)) {
		$db->query("insert into h_form_content (mid, posttime, list, uid, username) values 
									(11, '".time()."', '".time()."', $lfjuid, '$lfjid')");
		$id = $db->insert_id();
		$db->query("insert into h_form_content_11 
					(id, uid, tijian_kahao, company_name, area, 
					scale, com_property, bus_yetai, bus_model, year, 
					zhiying_count, jiameng_count, chengbao_count, fenbu_count, guowai_count, 
					luyong_people, lizhi_people, zhiying_people, jiameng_people, chengbao_people,
					total_people, zhiying_people2, jiameng_people2, chengbao_people2, total_people2,
					
					t1_4_1, t1_1_4, t1_1_5, t1_2_4, t1_2_5, 
					t1_3_4, t1_3_5, t1_4_4, t1_4_5, t2_5, t2_6, 
					
					t3_1_2, t3_2_2, t3_3_2, t3_4_2, t3_5_2,
					t3_6_2, t3_7_2, t3_8_2, t3_9_2, t3_10_2, 
					t3_11_2, t3_12_2, t3_13_2, t3_14_2, t3_15_2,
					t3_16_2, t3_17_2, t3_18_2, t3_19_2, t3_20_2,
					t3_21_2, t3_22_2,
					t3_1_1, t3_2_1, t3_3_1, t3_4_1, t3_5_1, 
					t3_6_1, t3_7_1, t3_8_1, t3_9_1, t3_10_1,
					t3_11_1, t3_12_1, t3_13_1, t3_14_1, t3_15_1, 
					t3_16_1, t3_17_1, t3_18_1, t3_19_1, t3_20_1, 
					t3_21_1, t3_22_1,
					t3_24_1, t3_24_2, t3_24_3, t3_24_4, t3_24_5,
					t3_25_1, t3_25_2, t3_25_3, t3_25_4, t3_25_5,
					t3_26_1, t3_26_2, t3_26_3, t3_26_4, t3_26_5,
					t3_27_1, t3_28_2, t3_29_2, t3_30_2, t3_28_1,
					t3_29_1, t3_30_1,
					t3_add_1_1,t3_add_1_2,t3_add_2_1,t3_add_2_2,
					faren,faren_phone,contracter,contract_phone,email,
					address,site)
					values 
					($id, $lfjuid, '$tijian_kahao', '$company_name', '$area', 
					'$scale', '$com_property', '$jingying_yetai', '$jingying_moshi', '$lastyear',
					'$t1_1_1', '$t1_2_1', '$t1_3_1', '$t2_1', '$t2_2',
					'$t2_3', '$t2_4', '$t1_1_3', '$t1_2_3', '$t1_3_3', 
					'$t1_4_3', '$t1_1_2', '$t1_2_2', '$t1_3_2', '$t1_4_2', 
					
					'$t1_4_1', '$t1_1_4', '$t1_1_5', '$t1_2_4', '$t1_2_5', 
					'$t1_3_4', '$t1_3_5', '$t1_4_4', '$t1_4_5', '$t2_5', '$t2_6', 
					
					'$t3_1_2', '$t3_2_2', '$t3_3_2', '$t3_4_2', '$t3_5_2', 
					'$t3_6_2', '$t3_7_2', '$t3_8_2', '$t3_9_2', '$t3_10_2',
					'$t3_11_2', '$t3_12_2', '$t3_13_2', '$t3_14_2', '$t3_15_2',
					'$t3_16_2', '$t3_17_2', '$t3_18_2', '$t3_19_2', '$t3_20_2',
					'$t3_21_2', '$t3_22_2',
					'$t3_1_1', '$t3_2_1', '$t3_3_1', '$t3_4_1', '$t3_5_1',
					'$t3_6_1', '$t3_7_1', '$t3_8_1', '$t3_9_1', '$t3_10_1',
					'$t3_11_1', '$t3_12_1', '$t3_13_1', '$t3_14_1', '$t3_15_1',
					'$t3_16_1', '$t3_17_1', '$t3_18_1', '$t3_19_1', '$t3_20_1',
					'$t3_21_1', '$t3_22_1',
					'$t3_24_1', '$t3_24_2', '$t3_24_3', '$t3_24_4', '$t3_24_5',
					'$t3_25_1', '$t3_25_2', '$t3_25_3', '$t3_25_4', '$t3_25_5',
					'$t3_26_1', '$t3_26_2', '$t3_26_3', '$t3_26_4', '$t3_26_5',
					'$t3_27_1', '$t3_28_2', '$t3_29_2', '$t3_30_2', '$t3_28_1',
					'$t3_29_1', '$t3_30_1', 
					'$t3_add_1_1', '$t3_add_1_1', '$t3_add_2_1', '$t3_add_2_2',
					'$userinfo[com_faren]', '$userinfo[faren_phone]', '$userinfo[contacter]', '$userinfo[mobphone]', '$userinfo[email]',
					'$userinfo[address]', '$userinfo[site_add]')");
	} else {
		/*
		$info;
		while($rs5 = $db->fetch_array($query)){
			$info=$rs5;
		}
		$a = mktime();
		$b = $info[posttime];

		$c = mktime(date("H"),date("i"),date("s"),date("m"),date("d"),date("Y"));
		$d = mktime(date("H"),date("i"),date("s"),date("m")-3,date("d"),date("Y"));
		
		if(($a-$b) >= ($c-$d)) {
			
			$db->query("DELETE FROM h_form_content WHERE mid=11 and uid=$lfjuid ");
			$db->query("DELETE FROM h_form_content_11 WHERE uid=$lfjuid ");
			
			$db->query("insert into h_form_content (mid, posttime, list, uid, username) values 
									(11, '".time()."', '".time()."', $lfjuid, '$lfjid')");
			$id = $db->insert_id();
			$db->query("insert into h_form_content_11 
						(id, uid, tijian_kahao, company_name, area, 
						scale, com_property, bus_yetai, bus_model, year, 
						zhiying_count, jiameng_count, chengbao_count, fenbu_count, guowai_count, 
						luyong_people, lizhi_people, zhiying_people, jiameng_people, chengbao_people,
						total_people, zhiying_people2, jiameng_people2, chengbao_people2, total_people2,
						
						t1_4_1, t1_1_4, t1_1_5, t1_2_4, t1_2_5, 
						t1_3_4, t1_3_5, t1_4_4, t1_4_5, t2_5, t2_6, 
						
						t3_1_2, t3_2_2, t3_3_2, t3_4_2, t3_5_2,
						t3_6_2, t3_7_2, t3_8_2, t3_9_2, t3_10_2, 
						t3_11_2, t3_12_2, t3_13_2, t3_14_2, t3_15_2,
						t3_16_2, t3_17_2, t3_18_2, t3_19_2, t3_20_2,
						t3_21_2, t3_22_2,
						t3_1_1, t3_2_1, t3_3_1, t3_4_1, t3_5_1, 
						t3_6_1, t3_7_1, t3_8_1, t3_9_1, t3_10_1,
						t3_11_1, t3_12_1, t3_13_1, t3_14_1, t3_15_1, 
						t3_16_1, t3_17_1, t3_18_1, t3_19_1, t3_20_1, 
						t3_21_1, t3_22_1,
						t3_24_1, t3_24_2, t3_24_3, t3_24_4, t3_24_5,
						t3_25_1, t3_25_2, t3_25_3, t3_25_4, t3_25_5,
						t3_26_1, t3_26_2, t3_26_3, t3_26_4, t3_26_5,
						t3_27_1, t3_28_2, t3_29_2, t3_30_2, t3_28_1,
						t3_29_1, t3_30_1, cz_zhishu, s1, s2, s3, 
						s4, s5, s6, s7, s8, s9)
						values 
						($id, $lfjuid, '$rs1[tijian_kahao]', '$rs1[company_name]', '$rs1[area]', 
						'$rs1[scale]', '$rs1[com_property]', '$rs1[bus_yetai]', '$rs1[bus_model]', '$rs1[year]',
						'$rs1[zhiying_count]', '$rs1[jiameng_count]', '$rs1[chengbao_count]', '$rs1[fenbu_count]', '$rs1[guowai_count]',
						'$rs1[luyong_people]', '$rs1[lizhi_people]', '$rs1[zhiying_people]', '$rs1[jiameng_people]', '$rs1[chengbao_people]', 
						'$rs1[total_people]', '$rs1[zhiying_people2]', '$rs1[jiameng_people2]', '$rs1[chengbao_people2]', '$rs1[total_people2]', 
						
						'$rs1[t1_4_1]', '$rs1[t1_1_4]', '$rs1[t1_1_5]', '$rs1[t1_2_4]', '$rs1[t1_2_5]', 
						'$rs1[t1_3_4]', '$rs1[t1_3_5]', '$rs1[t1_4_4]', '$rs1[t1_4_5]', '$rs1[t2_5]', '$rs1[t2_6]', 
						
						'$rs1[t3_1_2]', '$rs1[t3_2_2]', '$rs1[t3_3_2]', '$rs1[t3_4_2]', '$rs1[t3_5_2]', 
						'$rs1[t3_6_2]', '$rs1[t3_7_2]', '$rs1[t3_8_2]', '$rs1[t3_9_2]', '$rs1[t3_10_2]',
						'$rs1[t3_11_2]', '$rs1[t3_12_2]', '$rs1[t3_13_2]', '$rs1[t3_14_2]', '$rs1[t3_15_2]',
						'$rs1[t3_16_2]', '$rs1[t3_17_2]', '$rs1[t3_18_2]', '$rs1[t3_19_2]', '$rs1[t3_20_2]',
						'$rs1[t3_21_2]', '$rs1[t3_22_2]',
						'$rs1[t3_1_1]', '$rs1[t3_2_1]', '$rs1[t3_3_1]', '$rs1[t3_4_1]', '$rs1[t3_5_1]',
						'$rs1[t3_6_1]', '$rs1[t3_7_1]', '$rs1[t3_8_1]', '$rs1[t3_9_1]', '$rs1[t3_10_1]',
						'$rs1[t3_11_1]', '$rs1[t3_12_1]', '$rs1[t3_13_1]', '$rs1[t3_14_1]', '$rs1[t3_15_1]',
						'$rs1[t3_16_1]', '$rs1[t3_17_1]', '$rs1[t3_18_1]', '$rs1[t3_19_1]', '$rs1[t3_20_1]',
						'$rs1[t3_21_1]', '$rs1[t3_22_1]',
						'$rs1[t3_24_1]', '$rs1[t3_24_2]', '$rs1[t3_24_3]', '$rs1[t3_24_4]', '$rs1[t3_24_5]',
						'$rs1[t3_25_1]', '$rs1[t3_25_2]', '$rs1[t3_25_3]', '$rs1[t3_25_4]', '$rs1[t3_25_5]',
						'$rs1[t3_26_1]', '$rs1[t3_26_2]', '$rs1[t3_26_3]', '$rs1[t3_26_4]', '$rs1[t3_26_5]',
						'$rs1[t3_27_1]', '$rs1[t3_28_2]', '$rs1[t3_29_2]', '$rs1[t3_30_2]', '$rs1[t3_28_1]',
						'$rs1[t3_29_1]', '$rs1[t3_30_1]', '$rs1[cz_zhishu]', '$rs1[s1]', '$rs1[s2]', '$rs1[s3]',
						'$rs1[s4]', '$rs1[s5]', '$rs1[s6]', '$rs1[s7]', '$rs1[s8]', '$rs1[s9]')");
			showerr("您已经申报成功!<br/><br/>
					<script type='text/javascript'>
					function check() {
						alert('请将打印的内容每页盖章后传真至010-66094187');
						return true;
					}
					</script>
					<form action=\"$webdb[www_url]/do/test.php\" method='post' onsubmit='return check();'>
					<input type='hidden' name='step' value='11'/>
					<a href=\"javascript:history.go(-1);\"><img src=\"$webdb[www_url]/images/health/images/shangyibu.jpg\" width=\"111\" height=\"37\"></a>
					<input type='image' value'打印' src='$webdb[www_url]/images/health/images/print.jpg'/>
					</form>
					");
		} else {
//			showerr("您已经申报过了!");
//		}
		*/
		$db->query("update h_form_content set posttime='".time()."', list='".time()."' where uid=$lfjuid and mid=11");
		
		$db->query("update h_form_content_11 set 
					tijian_kahao='$tijian_kahao', company_name='$company_name', area='$area', 
					scale='$scale', com_property='$com_property', bus_yetai='$jingying_yetai', bus_model='$jingying_moshi', year='$lastyear', 
					zhiying_count='$t1_1_1', jiameng_count='$t1_2_1', chengbao_count='$t1_3_1', fenbu_count='$t2_1', guowai_count='$t2_2', 
					luyong_people='$t2_3', lizhi_people='$t2_4', zhiying_people='$t1_1_3', jiameng_people='$t1_2_3', chengbao_people='$t1_3_3',
					total_people='$t1_4_3', zhiying_people2='$t1_1_2', jiameng_people2='$t1_2_2', chengbao_people2='$t1_3_2', total_people2='$t1_4_2',
					
					t1_4_1='$t1_4_1', t1_1_4='$t1_1_4', t1_1_5='$t1_1_5', t1_2_4='$t1_2_4', t1_2_5='$t1_2_5', 
					t1_3_4='$t1_3_4', t1_3_5='$t1_3_5', t1_4_4='$t1_4_4', t1_4_5='$t1_4_5', t2_5='$t2_5', t2_6='$t2_6',
					
					t3_1_2='$t3_1_2', t3_2_2='$t3_2_2', t3_3_2='$t3_3_2', t3_4_2='$t3_4_2', t3_5_2='$t3_5_2', 
					t3_6_2='$t3_6_2', t3_7_2='$t3_7_2', t3_8_2='$t3_8_2', t3_9_2='$t3_9_2', t3_10_2='$t3_10_2',
					t3_11_2='$t3_11_2', t3_12_2='$t3_12_2', t3_13_2='$t3_13_2', t3_14_2='$t3_14_2', t3_15_2='$t3_15_2',
					t3_16_2='$t3_16_2', t3_17_2='$t3_17_2', t3_18_2='$t3_18_2', t3_19_2='$t3_19_2', t3_20_2='$t3_20_2',
					t3_21_2='$t3_21_2', t3_22_2='$t3_22_2',
					t3_1_1='$t3_1_1', t3_2_1='$t3_2_1', t3_3_1='$t3_3_1', t3_4_1='$t3_4_1', t3_5_1='$t3_5_1',
					t3_6_1='$t3_6_1', t3_7_1='$t3_7_1', t3_8_1='$t3_8_1', t3_9_1='$t3_9_1', t3_10_1='$t3_10_1',
					t3_11_1='$t3_11_1', t3_12_1='$t3_12_1', t3_13_1='$t3_13_1', t3_14_1='$t3_14_1', t3_15_1='$t3_15_1',
					t3_16_1='$t3_16_1', t3_17_1='$t3_17_1', t3_18_1='$t3_18_1', t3_19_1='$t3_19_1', t3_20_1='$t3_20_1',
					t3_21_1='$t3_21_1', t3_22_1='$t3_22_1',
					t3_24_1='$t3_24_1', t3_24_2='$t3_24_2', t3_24_3='$t3_24_3', t3_24_4='$t3_24_4', t3_24_5='$t3_24_5',
					t3_25_1='$t3_25_1', t3_25_2='$t3_25_2', t3_25_3='$t3_25_3', t3_25_4='$t3_25_4', t3_25_5='$t3_25_5',
					t3_26_1='$t3_26_1', t3_26_2='$t3_26_2', t3_26_3='$t3_26_3', t3_26_4='$t3_26_4', t3_26_5='$t3_26_5',
					t3_27_1='$t3_27_1', t3_28_2='$t3_28_2', t3_29_2='$t3_29_2', t3_30_2='$t3_30_2', t3_28_1='$t3_28_1',
					t3_29_1='$t3_29_1', t3_30_1='$t3_30_1', 
					t3_add_1_1='$t3_add_1_1', t3_add_1_2='$t3_add_1_2', t3_add_2_1='$t3_add_2_1', t3_add_2_2='$t3_add_2_2',
					faren='$userinfo[com_faren]',faren_phone='$userinfo[faren_phone]',contracter='$userinfo[contacter]',contract_phone='$userinfo[mobphone]',email='$userinfo[email]',
					address='$userinfo[address]',site='$userinfo[site_add]'
						where uid=$lfjuid ");
//		}
	}
	
	require(html("print"));
} elseif ($step==3) {// 健康体检
	
	$baiqiang_form = $db->get_one("select usetitle from h_form_module where id=10");
	if($baiqiang_form['usetitle']==0) {
		showerr("体检功能已关闭!");
	}
	
	if(!$lfjuid)
		showerr("请您先登录我们的网站!");
	
	if($tijian_kahao == "") {
		showerr("体检卡号不能为空");
	}
	if($company_name == "") {
		showerr("企业名称不能为空");
	}
	
	if($t1_1_4 == "" || $t1_1_5 == "" || $t3_6_1 == "" || $t3_6_2 == "") {
		showerr("请输入两年度直营店营业收入<br/>".$backBtn);
	}
	if($t1_4_4 == "" || $t1_4_5 == "") {
		showerr("请输入两年度合计营业收入<br/>".$backBtn);
	}
	if($t3_7_1 == "" || $t3_7_2 == "" || $t3_8_1 == "" || $t3_8_2 == "") {
		showerr("请输入营业成本及原料成本<br/>".$backBtn);
	}
	if($t3_10_1 == "" || $t3_10_2 == "" || $t3_11_1 == "" || $t3_11_2 == "") {
		showerr("请输入营业费用及人工费用<br/>".$backBtn);
	}
	if($t3_21_1 == "" || $t3_21_2 == "") {
		showerr("请输入利润总额<br/>".$backBtn);
	}
	
	// 规模
	if($scale == 0) {
		$scale = "";
	} elseif($scale == 1) {
		$scale = "500万-1000万";
	} elseif($scale == 2) {
		$scale = "1000万-2000万";
	} elseif($scale == 3) {
		$scale = "3000万-1亿";
	} elseif($scale == 4) {
		$scale = "1亿-3亿";
	} elseif($scale == 5) {
		$scale = "3亿以上";
	} elseif($scale == 5) {
		$scale = "500万以下";
	}
	
	// 企业性质
	if($com_property == 0) {
		$com_property = "";
	} elseif($com_property == 1) {
		$com_property = "民营";
	} elseif($com_property == 2) {
		$com_property = "国营";
	} elseif($com_property == 3) {
		$com_property = "股份制";
	} elseif($com_property == 4) {
		$com_property = "外资";
	} elseif($com_property == 5) {
		$com_property = "合资";
	}
	// 经营业态
	if($jingying_yetai == 0) {
		$jingying_yetai = "";
	} elseif($jingying_yetai == 1) {
		$jingying_yetai = "中餐";
	} elseif($jingying_yetai == 2) {
		$jingying_yetai = "快餐";
	} elseif($jingying_yetai == 3) {
		$jingying_yetai = "西餐";
	} elseif($jingying_yetai == 4) {
		$jingying_yetai = "火锅";
	} elseif($jingying_yetai == 5) {
		$jingying_yetai = "酒店餐饮";
	} elseif($jingying_yetai == 6) {
		$jingying_yetai = "休闲餐饮";
	} elseif($jingying_yetai == 7) {
		$jingying_yetai = "团膳";
	} elseif($jingying_yetai == 8) {
		$jingying_yetai = "其他";
	}
	// 经营模式
	if($jingying_moshi == 0) {
		$jingying_moshi = "";
	} elseif($jingying_moshi == 1) {
		$jingying_moshi = "单店经营";
	} elseif($jingying_moshi == 2) {
		$jingying_moshi = "在某一省（市）的多门店连锁经营";
	} elseif($jingying_moshi == 3) {
		$jingying_moshi = "跨区域的多门店连锁经营";
	} elseif($jingying_moshi == 4) {
		$jingying_moshi = "多业态、跨区域的集团经营";
	}
	
	$userinfo = $db->get_one("SELECT * FROM h_memberdata WHERE uid=$lfjuid");
	if(!$userinfo)
		showerr("无法找到您的帐户，请重新登录");
	
	if(!$t1_1_1) $t1_1_1=0;if(!$t1_1_2) $t1_1_2=0;if(!$t1_1_3) $t1_1_3=0;if(!$t1_1_4) $t1_1_4=0;if(!$t1_1_5) $t1_1_5=0;
	if(!$t1_2_1) $t1_2_1=0;if(!$t1_2_2) $t1_2_2=0;if(!$t1_2_3) $t1_2_3=0;if(!$t1_2_4) $t1_2_4=0;if(!$t1_2_5) $t1_2_5=0;
	if(!$t1_3_1) $t1_3_1=0;if(!$t1_3_2) $t1_3_2=0;if(!$t1_3_3) $t1_3_3=0;if(!$t1_3_4) $t1_3_4=0;if(!$t1_3_5) $t1_3_5=0;
	if(!$t1_4_1) $t1_4_1=0;if(!$t1_4_2) $t1_4_2=0;if(!$t1_4_3) $t1_4_3=0;if(!$t1_4_4) $t1_4_4=0;if(!$t1_4_5) $t1_4_5=0;
	
	if(!$t2_1) $t2_1=0;if(!$t2_2) $t2_2=0;if(!$t2_3) $t2_3=0;if(!$t2_4) $t2_4=0;if(!$t2_5) $t2_5=0;if(!$t2_6) $t2_6=0;
	
	if(!$t3_1_1) $t3_1_1=0;if(!$t3_1_2) $t3_1_2=0;
	if(!$t3_2_1) $t3_2_1=0;if(!$t3_2_2) $t3_2_2=0;
	if(!$t3_3_1) $t3_3_1=0;if(!$t3_3_2) $t3_3_2=0;
	if(!$t3_4_1) $t3_4_1=0;if(!$t3_4_2) $t3_4_2=0;
	if(!$t3_5_1) $t3_5_1=0;if(!$t3_5_2) $t3_5_2=0;
	if(!$t3_6_1) $t3_6_1=0;if(!$t3_6_2) $t3_6_2=0;
	if(!$t3_7_1) $t3_7_1=0;if(!$t3_7_2) $t3_7_2=0;
	if(!$t3_8_1) $t3_8_1=0;if(!$t3_8_2) $t3_8_2=0;
	if(!$t3_9_1) $t3_9_1=0;if(!$t3_9_2) $t3_9_2=0;
	if(!$t3_10_1) $t3_10_1=0;if(!$t3_10_2) $t3_10_2=0;
	if(!$t3_11_1) $t3_11_1=0;if(!$t3_11_2) $t3_11_2=0;
	if(!$t3_12_1) $t3_12_1=0;if(!$t3_12_2) $t3_12_2=0;
	if(!$t3_13_1) $t3_13_1=0;if(!$t3_13_2) $t3_13_2=0;
	if(!$t3_14_1) $t3_14_1=0;if(!$t3_14_2) $t3_14_2=0;
	if(!$t3_15_1) $t3_15_1=0;if(!$t3_15_2) $t3_15_2=0;
	if(!$t3_16_1) $t3_16_1=0;if(!$t3_16_2) $t3_16_2=0;
	if(!$t3_17_1) $t3_17_1=0;if(!$t3_17_2) $t3_17_2=0;
	if(!$t3_18_1) $t3_18_1=0;if(!$t3_18_2) $t3_18_2=0;
	if(!$t3_19_1) $t3_19_1=0;if(!$t3_19_2) $t3_19_2=0;
	if(!$t3_20_1) $t3_20_1=0;if(!$t3_20_2) $t3_20_2=0;
	if(!$t3_21_1) $t3_21_1=0;if(!$t3_21_2) $t3_21_2=0;
	if(!$t3_22_1) $t3_22_1=0;if(!$t3_22_2) $t3_22_2=0;
	
	if(!$t3_24_1) $t3_24_1=0;if(!$t3_24_2) $t3_24_2=0;if(!$t3_24_3) $t3_24_3=0;if(!$t3_24_4) $t3_24_4=0;if(!$t3_24_5) $t3_24_5=0;
	if(!$t3_25_1) $t3_25_1=0;if(!$t3_25_2) $t3_25_2=0;if(!$t3_25_3) $t3_25_3=0;if(!$t3_25_4) $t3_25_4=0;if(!$t3_25_5) $t3_25_5=0;
	if(!$t3_26_1) $t3_26_1=0;if(!$t3_26_2) $t3_26_2=0;if(!$t3_26_3) $t3_26_3=0;if(!$t3_26_4) $t3_26_4=0;if(!$t3_26_5) $t3_26_5=0;
	if(!$t3_27_1) $t3_27_1=0;
	
	if(!$t3_28_1) $t3_28_1=0;if(!$t3_28_2) $t3_28_2=0;
	if(!$t3_29_1) $t3_29_1=0;if(!$t3_29_2) $t3_29_2=0;
	if(!$t3_30_1) $t3_30_1=0;if(!$t3_30_2) $t3_30_2=0;
	if(!$t3_add_1_1) $t3_add_1_1=0;if(!$t3_add_1_2) $t3_add_1_2=0;
	if(!$t3_add_2_1) $t3_add_2_1=0;if(!$t3_add_2_2) $t3_add_2_2=0;
	
	require(ROOT_PATH."inc/head.php");

	$lastyear = date("Y")-1;
	$blastyear = date("Y")-2;
	
	// 成本费用利润率
	$s1 = (int)$t3_21_2/((int)$t3_7_2 + (int)$t3_10_2 + (int)$t3_15_2 + (int)$t3_18_2 + (int)$t3_19_2);
	$s1 = round($s1, 4) * 100;
	
	// 营业利润率
	$s2 = (int)$t3_20_2 / (int)$t3_6_2;
	$s2 = round($s2, 4) * 100;
	
	// 应收账款周转率
	$s3 = (int)$t3_6_2 / ((((int)$t3_5_2 + (int)$t3_5_1)/2) + (((int)$t3_3_1 + (int)$t3_3_2)/2));
	$s3 = round($s3, 2);
	
	// 营业收入增长率
	$s4 = ((int)$t3_6_2 - (int)$t3_6_1) / (int)$t3_6_1;
	$s4 = round($s4, 4) * 100;
	
	// 营业利润增长率
	$s5 = ((int)$t3_20_2 - (int)$t3_20_1) / (int)$t3_20_1;
	$s5 = round($s5, 4) * 100;
	
	// 人均劳效
	$s6 = (int)$t3_6_2 / (((int)$t1_1_3 + (int)$t1_1_2)/2);
	$s6 = round($s6, 2);
	
	// 员工流失率
	$s7 = (int)$t2_4 / ((int)$t2_4 + (int)$t1_1_3);
	$s7 = round($s7, 4) * 100;
	
	// 核心产品销售比重
	$s8 = (int)$t3_27_1 / (int)$t3_6_2;
	$s8 = round($s8, 4) * 100;
	
	// 每平米劳效
	$s9 = ((int)$t3_6_2 * 10000) / (((int)$t3_29_2 + (int)$t3_29_1)/2);
	$s9 = round($s9, 2);

	$query2 = $db->query("SELECT * FROM h_article_content_109 order by aid");
	$i=0;
	while($rs2 = $db->fetch_array($query2)){
		$biaogan[$i] = $rs2[my_content];
		$i++;
	}
	
	$zhishu = $s1/$biaogan[0] * 1 + 
			  $s2/$biaogan[1] * 1.4+ 
			  $s3/$biaogan[2] * 1.2 +
			  $s4/$biaogan[3] * 0.8 +
			  $s5/$biaogan[4] * 1 +
			  $s6/$biaogan[5] * 1.2 + 
			  $biaogan[6]/$s7 * 1 + 
			  $s8/$biaogan[7] * 0.6 +
			  $s9/$biaogan[8] * 1.8;
	$zhishu = round($zhishu, 2);
	if($zhishu > 10) {
		$zhishu = 10;
	} elseif($zhishu < 0) {
		$zhishu = 0;
	}
	$zhishu_length = "0";
	if($zhishu >= 8.5) {
		$zhishu_length = "50px";
	} elseif($zhishu >= 7) {
		$zhishu_length = "165px";
	} elseif($zhishu >= 5) {
		$zhishu_length = "280px";
	} elseif($zhishu >3 ) {
		$zhishu_length = "390px";
	} else {
		$zhishu_length = "500px";
	}
	
	
	$query = $db->query("SELECT * FROM h_form_content WHERE uid=$lfjuid and mid=10 ");
	if(!mysql_num_rows($query)) {
		$db->query("insert into h_form_content (mid, posttime, list, uid, username) values 
									(10, '".time()."', '".time()."', $lfjuid, '$lfjid')");
		$id = $db->insert_id();
		$db->query("insert into h_form_content_10 
					(id, uid, tijian_kahao, company_name, area, 
					scale, com_property, bus_yetai, bus_model, year, 
					zhiying_count, jiameng_count, chengbao_count, fenbu_count, guowai_count, 
					luyong_people, lizhi_people, zhiying_people, jiameng_people, chengbao_people,
					total_people, zhiying_people2, jiameng_people2, chengbao_people2, total_people2,
					
					t1_4_1, t1_1_4, t1_1_5, t1_2_4, t1_2_5, 
					t1_3_4, t1_3_5, t1_4_4, t1_4_5, t2_5, t2_6, 
					
					t3_1_2, t3_2_2, t3_3_2, t3_4_2, t3_5_2,
					t3_6_2, t3_7_2, t3_8_2, t3_9_2, t3_10_2, 
					t3_11_2, t3_12_2, t3_13_2, t3_14_2, t3_15_2,
					t3_16_2, t3_17_2, t3_18_2, t3_19_2, t3_20_2,
					t3_21_2, t3_22_2,
					t3_1_1, t3_2_1, t3_3_1, t3_4_1, t3_5_1, 
					t3_6_1, t3_7_1, t3_8_1, t3_9_1, t3_10_1,
					t3_11_1, t3_12_1, t3_13_1, t3_14_1, t3_15_1, 
					t3_16_1, t3_17_1, t3_18_1, t3_19_1, t3_20_1, 
					t3_21_1, t3_22_1,
					t3_24_1, t3_24_2, t3_24_3, t3_24_4, t3_24_5,
					t3_25_1, t3_25_2, t3_25_3, t3_25_4, t3_25_5,
					t3_26_1, t3_26_2, t3_26_3, t3_26_4, t3_26_5,
					t3_27_1, t3_28_2, t3_29_2, t3_30_2, t3_28_1,
					t3_29_1, t3_30_1, cz_zhishu, s1, s2, s3, 
					s4, s5, s6, s7, s8, s9, t3_add_1_1, t3_add_1_2, t3_add_2_1, t3_add_2_2,
					faren,faren_phone,contracter,contract_phone,email,
					address,site)
					values 
					($id, $lfjuid, '$tijian_kahao', '$company_name', '$area', 
					'$scale', '$com_property', '$jingying_yetai', '$jingying_moshi', '$lastyear',
					'$t1_1_1', '$t1_2_1', '$t1_3_1', '$t2_1', '$t2_2',
					'$t2_3', '$t2_4', '$t1_1_3', '$t1_2_3', '$t1_3_3', 
					'$t1_4_3', '$t1_1_2', '$t1_2_2', '$t1_3_2', '$t1_4_2', 
					
					'$t1_4_1', '$t1_1_4', '$t1_1_5', '$t1_2_4', '$t1_2_5', 
					'$t1_3_4', '$t1_3_5', '$t1_4_4', '$t1_4_5', '$t2_5', '$t2_6', 
					
					'$t3_1_2', '$t3_2_2', '$t3_3_2', '$t3_4_2', '$t3_5_2',
					'$t3_6_2', '$t3_7_2', '$t3_8_2', '$t3_9_2', '$t3_10_2', 
					'$t3_11_2', '$t3_12_2', '$t3_13_2', '$t3_14_2', '$t3_15_2',
					'$t3_16_2', '$t3_17_2', '$t3_18_2', '$t3_19_2', '$t3_20_2',
					'$t3_21_2', '$t3_22_2',
					'$t3_1_1', '$t3_2_1', '$t3_3_1', '$t3_4_1', '$t3_5_1', 
					'$t3_6_1', '$t3_7_1', '$t3_8_1', '$t3_9_1', '$t3_10_1',
					'$t3_11_1', '$t3_12_1', '$t3_13_1', '$t3_14_1', '$t3_15_1', 
					'$t3_16_1', '$t3_17_1', '$t3_18_1', '$t3_19_1', '$t3_20_1', 
					'$t3_21_1', '$t3_22_1',
					'$t3_24_1', '$t3_24_2', '$t3_24_3', '$t3_24_4', '$t3_24_5',
					'$t3_25_1', '$t3_25_2', '$t3_25_3', '$t3_25_4', '$t3_25_5',
					'$t3_26_1', '$t3_26_2', '$t3_26_3', '$t3_26_4', '$t3_26_5',
					'$t3_27_1', '$t3_28_2', '$t3_29_2', '$t3_30_2', '$t3_28_1',
					'$t3_29_1', '$t3_30_1', '$zhishu', '$s1', '$s2', '$s3', 
					'$s4', '$s5', '$s6', '$s7', '$s8', '$s9', '$t3_add_1_1', '$t3_add_1_2', '$t3_add_2_1', '$t3_add_2_2',
					'$userinfo[com_faren]', '$userinfo[faren_phone]', '$userinfo[contacter]', '$userinfo[mobphone]', '$userinfo[email]',
					'$userinfo[address]', '$userinfo[site_add]')");
					
	} else {
		$db->query("update h_form_content set posttime='".time()."', list='".time()."' where uid=$lfjuid and mid=10");
		
		$db->query("update h_form_content_10 set 
					tijian_kahao='$tijian_kahao', company_name='$company_name', area='$area', 
					scale='$scale', com_property='$com_property', bus_yetai='$jingying_yetai', bus_model='$jingying_moshi', year='$lastyear', 
					zhiying_count='$t1_1_1', jiameng_count='$t1_2_1', chengbao_count='$t1_3_1', fenbu_count='$t2_1', guowai_count='$t2_2', 
					luyong_people='$t2_3', lizhi_people='$t2_4', zhiying_people='$t1_1_3', jiameng_people='$t1_2_3', chengbao_people='$t1_3_3',
					total_people='$t1_4_3', zhiying_people2='$t1_1_2', jiameng_people2='$t1_2_2', chengbao_people2='$t1_3_2', total_people2='$t1_4_2',
					
					t1_4_1='$t1_4_1', t1_1_4='$t1_1_4', t1_1_5='$t1_1_5', t1_2_4='$t1_2_4', t1_2_5='$t1_2_5', 
					t1_3_4='$t1_3_4', t1_3_5='$t1_3_5', t1_4_4='$t1_4_4', t1_4_5='$t1_4_5', t2_5='$t2_5', t2_6='$t2_6', 
					
					t3_1_2='$t3_1_2', t3_2_2='$t3_2_2', t3_3_2='$t3_3_2', t3_3_2='$t3_3_2', t3_5_2='$t3_5_2',
					t3_6_2='$t3_6_2', t3_7_2='$t3_7_2', t3_8_2='$t3_8_2', t3_9_2='$t3_9_2', t3_10_2='$t3_10_2', 
					t3_11_2='$t3_11_2', t3_12_2='$t3_12_2', t3_13_2='$t3_13_2', t3_14_2='$t3_14_2', t3_15_2='$t3_15_2',
					t3_16_2='$t3_16_2', t3_17_2='$t3_17_2', t3_18_2='$t3_18_2', t3_19_2='$t3_19_2', t3_20_2='$t3_20_2',
					t3_21_2='$t3_21_2', t3_22_2='$t3_22_2',
					t3_1_1='$t3_1_1', t3_2_1='$t3_2_1', t3_3_1='$t3_3_1', t3_4_1='$t3_4_1', t3_5_1='$t3_5_1', 
					t3_6_1='$t3_6_1', t3_7_1='$t3_7_1', t3_8_1='$t3_8_1', t3_9_1='$t3_9_1', t3_10_1='$t3_10_1',
					t3_11_1='$t3_11_1', t3_12_1='$t3_12_1', t3_13_1='$t3_13_1', t3_14_1='$t3_14_1', t3_15_1='$t3_15_1', 
					t3_16_1='$t3_16_1', t3_17_1='$t3_17_1', t3_18_1='$t3_18_1', t3_19_1='$t3_19_1', t3_20_1='$t3_20_1', 
					t3_21_1='$t3_21_1', t3_22_1='$t3_22_1',
					t3_24_1='$t3_24_1', t3_24_2='$t3_24_2', t3_24_3='$t3_24_3', t3_24_4='$t3_24_4', t3_24_5='$t3_24_5',
					t3_25_1='$t3_25_1', t3_25_2='$t3_25_2', t3_25_3='$t3_25_3', t3_25_4='$t3_25_4', t3_25_5='$t3_25_5',
					t3_26_1='$t3_26_1', t3_26_2='$t3_26_2', t3_26_3='$t3_26_3', t3_26_4='$t3_26_4', t3_26_5='$t3_26_5',
					t3_27_1='$t3_27_1', t3_28_2='$t3_28_2', t3_29_2='$t3_29_2', t3_30_2='$t3_30_2', t3_28_1='$t3_28_1',
					t3_29_1='$t3_29_1', t3_30_1='$t3_30_1', cz_zhishu='$zhishu', s1='$s1', s2='$s2', s3='$s3', 
					s4='$s4', s5='$s5', s6='$s6', s7='$s7', s8='$s8', s9='$s9', 
					t3_add_1_1='$t3_add_1_1', t3_add_1_2='$t3_add_1_2', t3_add_2_1='$t3_add_2_1', t3_add_2_2='$t3_add_2_2',
					faren='$userinfo[com_faren]',faren_phone='$userinfo[faren_phone]',contracter='$userinfo[contacter]',contract_phone='$userinfo[mobphone]',email='$userinfo[email]',
					address='$userinfo[address]',site='$userinfo[site_add]'
						where uid=$lfjuid ");
						
	}
	
	$db->query("update h_memberdata set tiyan_count=tiyan_count+1 where uid=$lfjuid");
	
	require(html("three"));
} elseif ($step==4) {
	if(!$lfjuid)
	showerr("请您先登录我们的网站!");
		
	require(ROOT_PATH."inc/head.php");
	require(html("four"));
} elseif ($step==5) {
	if(!$lfjuid)
	showerr("请您先登录我们的网站!");
	
	$zhishu_length = $zhishu_length * 0.88;
	$zhishu_length = $zhishu_length."px";
	$date = date("Y-m-d");
	require(ROOT_PATH."inc/head.php");
	require(html("five"));
} elseif($step==20) {
	require(ROOT_PATH."inc/head.php");
	require(html("baiqiang"));
}

if($step != 11 && $step != 10)
	require(ROOT_PATH."inc/foot.php");
?>